package com.nov.multidatasource.dao.secondary;

import com.nov.multidatasource.entity.secondary.PanGangTFileBaseIndex;
import com.nov.multidatasource.entity.secondary.V6FileExtraInfoEntity;
import com.nov.multidatasource.entity.secondary.V6FileInfo;
import com.nov.multidatasource.entity.secondary.V6TaskInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Mapper
public interface V6FileInfoMapper {


    int insert(@Param("list") List<V6FileInfo> list);

    void batchInsertV6Task(@Param("list") List<V6TaskInfoEntity> taskInfoEntities);

    void deleteV6FileInFileIds(@Param("fileIds") List<String> fileIds);

    void deleteV6TaskInBusNos(@Param("busiNos") List<String> busiNos);


    V6FileInfo selectV6FileByFileId(@Param("fileId") String fileId);


    List<V6FileInfo> selectV6FileByBusNo(String busNo);

    List<V6FileInfo> selectV6FilePage(@Param("page") int page, @Param("size") int size, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<V6FileInfo> selectV6FilePageByCUS7(@Param("page") int page, @Param("size") int size, @Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 获取新增文件
     *
     * @return
     */
    List<V6FileInfo> selectV6NewIncreaseFile();

    int selectV6FileCount(String startTime, String endTime);

    void updateFileCus7ById(@Param("cus7") String cus7, @Param("ids") List<Long> ids);

    int batchInsertV6Ext(@Param("list") List<V6FileExtraInfoEntity> list);


    /**
     *  查询攀钢的文件数据, 待同步的
     */
    List<Map<String, Object>> queryPanGangData(@Param("start") Integer start, @Param("pageSize") Integer pageSize);

    Integer queryPanGangDataCount();

    int updateSyncCus(@Param("fileId") String fileId);

    List<PanGangTFileBaseIndex> queryFileByFileIds(@Param("fileIds") List<String> fileIds);

    int batchUpdateFileSyncStatus(@Param(value = "list") List<String> list, @Param(value = "status") Integer status);

    List<String> queryFileImageObject0ByFileId(@Param(value = "fileId") String fileId);

}
